from app import db


class Book(db.Model):
    __tablename__ = "books"
    book_id = db.Column(db.BigInteger, primary_key=True, nullable=False)
    book_title = db.Column(db.String(30), nullable=False)
    author = db.Column(db.String(30), nullable=False)
    bookISBN = db.Column(db.String(30), nullable=False)
    publishing_house = db.Column(db.String(30), nullable=False)
    stock = db.Column(db.Integer, nullable=False)
    gmt_create = db.Column(db.DateTime, nullable=False)
    gmt_modified = db.Column(db.DateTime, nullable=False)
    description = db.Column(db.Text, nullable=False)
    source = db.Column(db.Text, nullable=False)
    is_user_book = db.Column(db.Boolean, nullable=False)